#! /bin/sh


PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
NAME="ldm"
BIN=@bindir@/ldmtool
DESC="Windows Logical Disk Manager volumes"

# Exit if package not installed

[ -x "$BIN" ] || exit 0

ldm_start() {
    echo "Starting $DESC"
    $BIN create all
    echo "Started $DESC"
}

ldm_stop() {
    echo "Stopping $DESC"
    $BIN remove all
    echo "Stopped $DESC"
}

ldm_restart() {
    ldm_stop
    sleep 3
    ldm Start
}


case "$1" in
'start')
ldm_start
;;
'stop')
ldm_stop
;;
'restart')
ldm_restart
;;
*)
    echo "usage $0 start|stop|restart"
esac
